package com.geely.receiver;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.nio.channels.Channel;
import java.util.Map;
import java.util.Objects;

/**
 * @author 占助
 * @date 2020/7/13 9:57
 * @description ${直连型信息接收监听类}  应路由模式
 * @Copyright © 吉利汽车
 * @Version: 1.0
 */
@Component
//@RabbitListener(queues = "TestDirectQueue") //监听的队列名称 TestDirectQueue 应路由模式
public class DirectReceiverNew {

//    @RabbitHandler
    @RabbitListener(queues = "TestDirectQueue")
    public  void  process(Message msg){

        System.out.println("第二个，DirectReceiver 消费者接收到消息：" + msg.toString());
    }

}
